@echo off
chcp 65001
echo.

echo =======环境管理========start
echo 查询现有的环境
echo conda info --env
echo 或
echo conda env list


echo 创建环境
echo 创建一个名为env_name的Python环境，并指定Python版本;如果python不存在,就会安装
echo conda create --name env_name python=3.8

echo 激活环境
echo conda activate env_name

echo 退出环境
echo conda deactivate

echo 克隆环境
echo conda create --name new_env_name --clone old_env_name

echo 删除环境
echo conda remove -n env_name --all
echo =====指定文件夹的虚拟环境
echo 创建虚拟环境
echo "conda create --prefix D:\java_project\wealth-center-auto-buy\utils\myenv python=3.8"
echo 激活虚拟环境
echo  conda activate D:\java_project\wealth-center-auto-buy\utils\myenv
echo 或者
echo C:\> conda create --prefix D:\java_project\wealth-center-auto-buy\myenv python=3.8
echo 激活环境
echo conda activate D:\java_project\wealth-center-auto-buy\myenv
echo =======环境管理========end
echo.
echo =======包管理========start
echo 查询已安装的包
echo conda list

echo 安装包
echo conda install package_name

echo 更新包
echo conda update package_name

echo 搜索包
echo conda search package_name

echo 卸载包
echo conda remove package_name
echo =======包管理========end
echo =======导出包========start
echo "(conda list | findstr /r /v "#" | findstr /r /v "$" | for /f "tokens=1,2 delims= " %a in ('conda list') do @echo %a==%b) > requirements.txt"
echo 安装包的时候,指定下载的镜像的名称
echo pip install -r requirements.txt  -i https://mirrors.aliyun.com/pypi/simple/   


pause